<!--
  -    Copyright (c) 2018-2025, lengleng All rights reserved.
  -
  - Redistribution and use in source and binary forms, with or without
  - modification, are permitted provided that the following conditions are met:
  -
  - Redistributions of source code must retain the above copyright notice,
  - this list of conditions and the following disclaimer.
  - Redistributions in binary form must reproduce the above copyright
  - notice, this list of conditions and the following disclaimer in the
  - documentation and/or other materials provided with the distribution.
  - Neither the name of the pig4cloud.com developer nor the names of its
  - contributors may be used to endorse or promote products derived from
  - this software without specific prior written permission.
  - Author: lengleng (wangiegie@gmail.com)
  -->

<template>
  <!--弹窗内容-->
  <div class="app-container calendar-list-container">
    <div class="filter-container">
      <el-input  style="width: 300px!important;" class="filter-item" placeholder='请输入要搜索的数据' v-model="listQuery.keyword" ></el-input>
      <div class="filter-item">
        <el-select v-model="type" style="width: 180px!important;"  @change="handleChangeType" placeholder="请选择">
          <el-option label="app" value="1"></el-option>
          <el-option label="商城" value="2"></el-option>
          <el-option label="云库" value="3"></el-option>
        </el-select>
      </div>
      <el-button class="filter-item" style="margin-left: 20px;margin-right: 20px;" type="primary" v-waves icon="search" @click="searchinformation">搜索</el-button>
    </div>
    <el-table :key='tableKey' :data="list" v-loading="listLoading" element-loading-text="给我一点时间" border fit highlight-current-row style="width: 99%">
      <el-table-column align="center" label="端口">
        <template slot-scope="scope">
          <span>{{scope.row.source}}</span>
        </template>
      </el-table-column>

      <el-table-column align="center" label="商品描述">
        <template slot-scope="scope">
          <img class="goodImg" :src="scope.row.surfaceImgUrl ? scope.row.surfaceImgUrl : scope.row.topPicture" />
          <span>{{scope.row.productName ? scope.row.productName : scope.row.goodsName}}</span>
        </template>
      </el-table-column>
      <el-table-column align="center" class-name="status-col" label="商品编号">
        <template slot-scope="scope">
          <span>{{scope.row.productNumber ? scope.row.productNumber : '无'}}</span>
        </template>
      </el-table-column>
      <el-table-column align="center" class-name="status-col" label="销售价格">
        <template slot-scope="scope">
          <span>{{scope.row.salePrice ? scope.row.salePrice : scope.row.discountPrice}}</span>
        </template>
      </el-table-column>
      <el-table-column align="center" label="原价" v-if="type === '1'">
        <template slot-scope="scope">
          <span>{{scope.row.prePrice ? scope.row.prePrice : scope.row.price}}</span>
        </template>
      </el-table-column>
      <el-table-column align="center" label="供应成本价" v-if="type === '2'">
        <template slot-scope="scope" >
          <span>{{scope.row.costPrice}}</span>
        </template>
      </el-table-column>

      <el-table-column align="center" class-name="status-col" label="库存数量">
        <template slot-scope="scope">
          <span>{{scope.row.repertoryNumber}}</span>
        </template>
      </el-table-column>
      <el-table-column align="center" class-name="status-col" label="商品类目">
        <template slot-scope="scope">
          <span>{{scope.row.category}}</span>
        </template>
      </el-table-column>
      <el-table-column align="center" class-name="status-col" label="类型" v-if="type === '1'">
        <template slot-scope="scope">
          <span>{{scope.row.type}}</span>
        </template>
      </el-table-column>
      <el-table-column align="center" class-name="status-col" label="创建时间">
        <template slot-scope="scope">
          <span>{{scope.row.createTime}}</span>
        </template>
      </el-table-column>
      <el-table-column align="center" class-name="status-col" label="状态">
        <template slot-scope="scope">
          <span v-if="scope.row.auditStatus === '0'">待审核</span>
          <span v-if="scope.row.auditStatus === '1'">审核通过</span>
          <span v-if="scope.row.auditStatus === '2'">审核不通过</span>
        </template>
      </el-table-column>
      <el-table-column align="center" label="操作" width="300">
        <template slot-scope="scope">
          <el-button size="mini"  type="primary" v-if="type === '3'" @click="transformGoods(scope.row)">转发</el-button>
          <el-button  size="mini" type="success" @click="handleCheckDetail(scope.row)">审核</el-button>
          <el-button size="mini"  type="danger" v-if="scope.row.auditStatus === '1' && scope.row.goodsStatus === '1'" @click="changeGoodsStatus(scope.row)">下架</el-button>
          <el-button size="mini"  type="primary" v-if="scope.row.auditStatus === '1' && scope.row.goodsStatus === '2'" @click="changeGoodsStatus(scope.row)">上架</el-button>
          <el-button size="mini"  type="danger" @click="shanchu(scope.row)">删除</el-button>
        </template>
      </el-table-column>
    </el-table>
    <div v-show="!listLoading" class="pagination-container">
      <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page.sync="listQuery.pageNo" :page-sizes="[10,20,30, 50]" :page-size="listQuery.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total"></el-pagination>
    </div>
    <el-dialog title="商品详情" :visible.sync="infoDialog">
      <div>
        <span class="title" style="margin-left: 30px;">基本信息:</span>
      </div>
      <el-form :label-position="labelPosition" label-width="100px">
        <el-form-item label="商品名称:">
          <span class="inputRow">{{goodDetail.goodsName}}</span>
        </el-form-item>
        <el-form-item label="主图:">
          <img :src="goodDetail.topPicture" class="avatars">
        </el-form-item>
        <el-form-item label="商品价格:" >
          <span class="inputRow">{{goodDetail.price}}</span>
        </el-form-item>
        <el-form-item label="折扣价格:">
          <span class="inputRow">{{goodDetail.discountPrice}}</span>
        </el-form-item>
        <el-form-item label="商品数量单位:">
          <span class="inputRow">{{goodDetail.priceUnit ? goodDetail.priceUnit : ''}}</span>
        </el-form-item>
        <el-form-item label="商品库存:">
          <span class="inputRow">{{goodDetail.inventory}}</span>
        </el-form-item>
        <el-form-item label="商品类目:" >
          <span class="inputRow">{{goodDetail.atype}}</span>
        </el-form-item>
        <el-form-item label="布料类型:"  v-if="mianliaoShow" >
          <span  class="inputRow">{{goodDetail.btype}}</span>
        </el-form-item>
        <el-form-item label="商品子类目:">
          <span class="inputRow">{{zileimuType}}</span>
        </el-form-item>
        <el-form-item label="工厂地址:"  v-if="gongChangDiZhiShow">
          <span class="inputRow">{{goodDetail.address}}</span>
        </el-form-item>
        <div>
          <span class="title">参数详情:</span>
        </div>
        <el-form-item label="商品货号:">
          <span  class="inputRow">{{goodDetail.artNo ? goodDetail.artNo : '无'}}</span>
        </el-form-item>
        <el-form-item label="编织工艺:" v-if="bianzhiShow && goodDetail.parameter">
          <span class="inputRow">{{goodDetail.parameter.weaveProcess === '1' ? '经编' : '纬编'}}</span>
        </el-form-item>
        <el-form-item label="商品分类:">
          <span  class="inputRow">{{filterValToWord(goodsCType, shangPinFenLeiList)}}</span>
        </el-form-item>
        <el-form-item label="商品类别:" v-if="leibieShow">
          <span  class="inputRow">{{filterValToWord(goodsDType, shangpinLieBieList)}}</span>
        </el-form-item>
        <el-form-item label="商品色系:" v-if="yanseShow">
          <span  class="inputRow">{{filterValToWord(color, colorList)}}</span>
        </el-form-item>
        <el-form-item label="拉头工艺:" v-if="latouShow && goodDetail.parameter">
          <span class="inputRow">{{goodDetail.parameter.sliderProcess}}</span>
        </el-form-item>
        <el-form-item label="生产工艺:"  v-if="shengchanShow && goodDetail.parameter">
          <span  class="inputRow">{{goodDetail.parameter.productionProcess}}</span>
        </el-form-item>
        <el-form-item label="潘通色号:"  v-if="pantongShow && goodDetail.parameter">
          <span  class="inputRow">{{goodDetail.parameter.pantoneNum}}</span>
        </el-form-item>
        <el-form-item label="克重:"  v-if="kezhongShow && goodDetail.parameter">
          <span  class="inputRow">{{goodDetail.parameter.weight}}</span>
        </el-form-item>
        <el-form-item label="幅宽(cm):"  v-if="fukuanShow && goodDetail.parameter">
          <span  class="inputRow">{{goodDetail.parameter.breadth}}</span>
        </el-form-item>
        <el-form-item label="原料纱支:" v-if="yuanliaoShow">
          <span  class="inputRow">{{filterValToWord(rawYarn, yuanliaoList)}}</span>
        </el-form-item>
        <el-form-item label="成本比例:" v-if="chengbenShow && goodDetail.parameter">
          <span  class="inputRow">{{goodDetail.parameter.componentProportion}}</span>
        </el-form-item>
        <el-form-item label="光泽度:"  v-if="guangzeShow">
          <span  class="inputRow">{{filterValToWord(glossiness, guangzeduList)}}</span>
        </el-form-item>
        <el-form-item label="花型尺寸:"   v-if="huaxingShow && goodDetail.parameter">
          <span  class="inputRow">{{goodDetail.parameter.flowerSize}}</span>
        </el-form-item>
        <el-form-item label="宽度:"  v-if="kuanduShow && goodDetail.parameter">
          <span  class="inputRow">{{goodDetail.parameter.width}}</span>
        </el-form-item>
        <el-form-item label="厚度:"   v-if="houduShow && goodDetail.parameter">
          <span  class="inputRow">{{goodDetail.parameter.thickness}}</span>
        </el-form-item>
        <el-form-item label="含胶量:"   v-if="hanjiaoShow">
          <span  class="inputRow">{{goodDetail.rubberContent}}</span>
        </el-form-item>
        <el-form-item label="其他参数:" v-if="qitaShow && goodDetail.parameter">
          <span class="inputRow">{{goodDetail.parameter.otherParam ? goodDetail.parameter.otherParam : '无'}}</span>
        </el-form-item>
        <el-form-item label="材质:"   v-if="caizhiShow">
          <span class="inputRow">{{filterValToWord(goodDetail.material, fuliaocaizhiList)}}</span>
        </el-form-item>
        <el-form-item label="弹力程度:"  v-if="tanliShow">
          <span class="inputRow">{{filterValToWord(goodDetail.elasticDegree, tanliList)}}</span>
        </el-form-item>
        <el-form-item label="花高:"   v-if="huagaoShow && goodDetail.parameter">
          <span  class="inputRow">{{goodDetail.parameter.flowerHigh}}</span>
        </el-form-item>
        <el-form-item label="宽度分类:" v-if="kuandufenleiShow">
          <span  class="inputRow">{{filterValToWord(goodDetail.widthClass, kuandufeneleiList)}}</span>
        </el-form-item>
        <el-form-item label="尺寸:"  v-if="chicunShow && goodDetail.parameter">
          <span  class="inputRow">{{goodDetail.parameter.zipperType}}</span>
        </el-form-item>
        <el-form-item label="规格型号:"  v-if="xinghaoShow && goodDetail.parameter">
          <span  class="inputRow">{{goodDetail.parameter.specificationModel}}</span>
        </el-form-item>
        <el-form-item label="杯型厚度:" v-if="beixingShow">
          <span class="inputRow">{{filterValToWord(cupThickness, beixingList)}}</span>
        </el-form-item>
        <el-form-item label="贴布材质:"    v-if="tiebuShow && goodDetail.parameter">
          <span  class="inputRow">{{goodDetail.parameter.patchMaterial}}</span>
        </el-form-item>
        <el-form-item label="规格尺寸:"   v-if="guigecicunShow && goodDetail.parameter">
          <span class="inputRow">{{goodDetail.parameter.size}}</span>
        </el-form-item>
        <el-form-item label="包装材质:"  v-if="baozhuangShow">
          <span  class="inputRow">{{filterValToWord(goodDetail.wrapperMaterial, baozhuangList)}}</span>
        </el-form-item>
        <el-form-item label="现货情况:" v-if="goodDetail.parameter">
          <span class="inputRow">{{goodDetail.parameter.buyType === '1' ? '现货' : '定制'}}</span>
        </el-form-item>
        <el-form-item label="描述信息:">
          <span style="width: 65%;display: inline-block;">{{goodDetail.describeInfo ? goodDetail.describeInfo : '无'}}</span>
        </el-form-item>
        <div>
          <span class="title">特别说明:</span>
        </div>
        <el-form-item  >
          <div class="detailContent">
            <span class="specialText">1、商品价格受原材料和市场趋势影响，最终成交价格以买卖双方确认后的价格为准；</span>
            <span class="specialText">2、图片与实际颜色会有误差，以收到货物的实际颜色为准；</span>
            <span class="specialText">3、门幅和克重在指定范围内会有差异；</span>
          </div>
        </el-form-item>
        <div>
          <span class="title">图片信息:</span>
        </div>
        <div class="imgContent">
          <img :src="item" class="topPic" v-for="(item, index) in picArr" :key="index" />
        </div>
        <el-form-item label="审核结果">
          <el-radio-group style="vertical-align: top;margin-top: 2px" v-model="status" size="medium" :disabled="goodDetail.examine !== '0'">
            <el-radio label="1" border>通过</el-radio>
            <el-radio label="2" border>不通过</el-radio>
          </el-radio-group>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="cancel()">取 消</el-button>
        <el-button type="primary" @click="shenheInfo()">确 定</el-button>
      </div>
    </el-dialog>
    <el-dialog title="商品详情" :visible.sync="pcDetailDialog">
      <div>
        <span class="title" style="margin-left: 30px;">基本信息:</span>
      </div>
      <el-form :label-position="labelPosition" label-width="100px">
        <el-form-item label="商品名称:">
          <span class="inputRow">{{goodDetail.productName}}</span>
        </el-form-item>
        <el-form-item label="商品描述:">
          <span class="inputRow">{{goodDetail.description}}</span>
        </el-form-item>
        <el-form-item label="主图:">
          <img :src="goodDetail.surfaceImgUrl" class="avatars">
        </el-form-item>
        <el-form-item label="产品分组:">
          <span class="inputRow">{{goodDetail.module}}</span>
        </el-form-item>
        <div>
          <span class="title">商品属性:</span>
        </div>
        <el-form-item label="供应类型:">
          <span class="inputRow">{{goodDetail.supplyType === '1' ? '实物' : '设计稿'}}</span>
        </el-form-item>
        <el-form-item label="适用人群:">
          <span class="inputRow">{{filterIdToRemark(goodDetail.categoryId, suitPeople)}}</span>
        </el-form-item>
        <el-form-item label="款式:">
          <span class="inputRow">{{filterIdToRemark(goodDetail.typeId, kindList)}}</span>
        </el-form-item>
        <el-form-item label="风格:">
          <span class="inputRow">{{filterIdToRemark(goodDetail.featureId, styleList)}}</span>
        </el-form-item>
        <el-form-item label="特征:" >
          <span class="inputRow">{{goodDetail.characteristicList}}</span>
        </el-form-item>
        <el-form-item label="材质:" >
          <span class="inputRow">{{goodDetail.materialList}}</span>
        </el-form-item>
        <el-form-item label="颜色:">
          <ul>
            <li v-for="(item, index) in goodDetail.colorList" :key="index" style="display: flex;align-items: center;margin-bottom: 15px;">
              <img width="100" height="100" :src="item.image" alt="">
              <span style="margin-left: 20px;">{{item.color}}</span>
            </li>
          </ul>
        </el-form-item>
        <el-form-item label="尺码:">
          <span class="inputRow">{{goodDetail.sizeList}}</span>
        </el-form-item>
        <el-form-item label="商品包装:">
          <span class="inputRow">{{goodDetail.packaging}}</span>
        </el-form-item>
        <el-form-item label="商品重量:">
          <span class="inputRow">{{goodDetail.weight}}</span>
        </el-form-item>
        <el-form-item label="商品功能:">
          <span class="inputRow">{{goodDetail.function}}</span>
        </el-form-item>
        <el-form-item label="产地:">
          <span class="inputRow">{{goodDetail.productPlace}}</span>
        </el-form-item>
        <el-form-item label="上市时间:">
          <span class="inputRow" v-if="goodDetail.promotionTime">{{goodDetail.promotionTime.substring(0, 10)}}</span>
        </el-form-item>
        <div>
          <span class="title">销售属性:</span>
        </div>
        <el-form-item label="划线价:" v-if="goodDetail.linePrice">
          <span class="inputRow">{{goodDetail.linePrice}}</span>
        </el-form-item>
        <el-form-item label="供货价:">
          <span class="inputRow">{{goodDetail.supplyPrice}}</span>
        </el-form-item>
        <el-form-item label="市场价:">
          <span class="inputRow">{{goodDetail.marketPrice}}</span>
        </el-form-item>
        <el-form-item label="成本价:" v-if="goodDetail.costPrice">
          <span class="inputRow">{{goodDetail.costPrice}}</span>
        </el-form-item>
        <el-form-item label="销售价:" v-if="goodDetail.salePrice">
          <span class="inputRow">{{goodDetail.salePrice}}</span>
        </el-form-item>
        <el-form-item label="拼单价:" v-if="goodDetail.crowdorderingPrice">
          <span class="inputRow">{{goodDetail.crowdorderingPrice}}</span>
        </el-form-item>
        <el-form-item label="总库存:">
          <span class="inputRow">{{goodDetail.repertoryNumber}}</span>
        </el-form-item>
        <div>
          <span class="title">商品详情:</span>
        </div>
        <el-form-item label="产品图:">
          <div class="imgContent">
            <img :src="item.url" class="topPic" v-for="(item, index) in productImgList" :key="index" />
          </div>
        </el-form-item>
        <el-form-item label="产品详情图:">
          <div class="imgContent">
            <img :src="item.url" class="topPic" v-for="(item, index) in detailImgList" :key="index" />
          </div>
        </el-form-item>
        <el-form-item label="审核结果">
          <el-radio-group style="vertical-align: top;margin-top: 2px" v-model="status" size="medium" :disabled="goodDetail.auditStatus !== '0'">
            <el-radio label="1" border>通过</el-radio>
            <el-radio label="2" border>不通过</el-radio>
          </el-radio-group>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="cancel()">取 消</el-button>
        <el-button type="primary" @click="shenheInfo()">确 定</el-button>
      </div>
    </el-dialog>
  </div>

</template>

<script>
  import { querySuitPeople, querySuitPeopleKind, queryStyleList, getShenHe, queryShangPinLeiMu, queryShangPinFenLei, goodsTypeTree, queryGoodsList, getGoodDetail, getInfo, getUnderRange, deleteGood } from '@/api/goods'
  import { getUserId } from '@/api/user'
  import { mapGetters, mapState } from 'vuex'
  import waves from '@/directive/waves/index.js' // 水波纹指令
  export default {
    components: {
    },
    name: 'seller_index',
    directives: {
      waves
    },
    data() {
      return {
        userId: '', // userId
        queryUrl: '', // 请求路径
        infoDialog: false, // 弹窗显示
        pcDetailDialog: false, // pc商品详情
        updateinfoDialog: false, // 修改信息弹窗
        textarea2: '', // 描述信息
        status: '1',
        id: '', // 商品id
        dialogImageUrl: '',
        dialogVisible: false,
        list: null, // 列表数据
        total: null, // 总条数
        listLoading: true, // loading
        role: [],
        labelPosition: 'right',
        listQuery: { // 请求列表参数
          dateSort: 1,
          source: 1,
          pageNo: 1,
          pageSize: 10,
          keyword: ''
        },
        goodsCType: '', // 商品分类
        goodsDType: '', // 商品类别
        cupThickness: '', // 杯型厚度
        zileimuType: '', // 商品子类目
        color: '', // 色系
        rawYarn: '', // 原料纱支
        glossiness: '', // 光泽度
        mianliaoShow: false, // 面料展示
        gongChangDiZhiShow: false, // 工厂地址展示
        baozhuangShow: true, // 包装材质
        guigecicunShow: true, // 规格尺寸
        tiebuShow: true, // 贴布材质
        beixingShow: true, // 杯型厚度
        xinghaoShow: true, // 规格型号
        chicunShow: true, // 杯型厚度
        kuandufenleiShow: true, // 宽度分类
        huagaoShow: true, // 花高
        tanliShow: true, // 弹力
        caizhiShow: true, // 材质
        qitaShow: true, // 其他参数
        hanjiaoShow: true, // 含胶量
        houduShow: true, // 厚度
        kuanduShow: true, // 宽度
        huaxingShow: true, // 花型尺寸
        guangzeShow: true, // 光泽
        chengbenShow: true, // 成分比例
        yuanliaoShow: true, // 原料纱支
        fukuanShow: true, // 幅宽
        kezhongShow: true, // 克重
        pantongShow: true, // 潘通色号
        shengchanShow: true, // 生产工艺
        latouShow: true, // 拉头工艺
        bianzhiShow: true, // 编织工艺
        yanseShow: true, // 颜色
        leibieShow: true, // 类别
        GoodLeiMuList: [], // 商品类目类别
        buLiaoList: [], // 面料列表
        childrenTypeList: [], // 子类目类表
        shangPinFenLeiList: [], // 商品分类
        shangpinLieBieList: [], // 商品类别
        colorList: [], // 颜色列列表
        yuanliaoList: [], // 原料纱织
        guangzeduList: [], // 光泽度列表
        fuliaocaizhiList: [], // 辅料材质列表
        tanliList: [], // 弹力程度列表
        kuandufeneleiList: [], // 宽度分类
        beixingList: [], // 杯型厚度
        pictureList: [], // 图片列表
        priceUnitList: [], // 商品数量单位列表
        baozhuangList: [], // 包装材质列表
        picArr: [], // 信息详情图片列表
        goodDetail: {}, // 商品详情
        defaultProps: {
          children: 'children',
          label: 'name'
        },
        type: '1', // 类型
        tableKey: 0,
        suitPeople: [], // 适用人群
        kindList: [], // 款式
        styleList: [], // 风格列表
        productImgList: [], // 产品图
        detailImgList: [] // 详情图
      }
    },
    computed: {
      ...mapGetters(['permissions']),
      ...mapState({
        userInfo: state => state.user.userInfo
      })
    },
    filters: {
      statusFilter(status) {
        const statusMap = {
          0: '待审批',
          1: '审批通过',
          2: '审批不通过'
        }
        return statusMap[status]
      }
    },
    created() {
      // this.getList()
      const that = this
      const datas = {
        phone: that.userInfo.phone
      }
      getUserId(datas).then(response => {
        that.userId = response.data.data.id
      })
      that.good_audit = that.permissions['good_audit']
      that.good_edit = that.permissions['good_edit']
      that.queryUrl = that.good_audit ? '/app/operateGoods/page' : '/app/yykGoods/mineGoodsPage'
      if (!that.good_audit) {
        const datas = {
          phone: that.userInfo.phone
        }
        getUserId(datas).then(response => {
          that.listQuery.userId = response.data.data.id
          that.getGoodsList()
        })
      } else {
        that.getGoodsList()
      }
      // 获取商品类目标签
      const url = '/app/yykGoodsType/goodsTypeTree/0'
      queryShangPinLeiMu(url, {}).then(response => {
        that.GoodLeiMuList = response.data.data
      })
      const unitUrl = '/app/dict/unit'
      queryShangPinFenLei(unitUrl, {}).then(response => {
        that.priceUnitList = response.data.data
      })
      // 颜色列表
      const colorUrl = '/app/dict/color'
      queryShangPinFenLei(colorUrl, {}).then(response => {
        that.colorList = response.data.data
      })
      // 原料纱支
      const yuanliaoUrl = '/app/dict/fabric_raw_yarn'
      queryShangPinFenLei(yuanliaoUrl, {}).then(response => {
        that.yuanliaoList = response.data.data
      })
      // 光泽度
      const guangzeduUrl = '/app/dict/glossiness'
      queryShangPinFenLei(guangzeduUrl, {}).then(response => {
        that.guangzeduList = response.data.data
      })
      // 辅料材质
      const fuliaocaizhiUrl = '/app/dict/accessory_material'
      queryShangPinFenLei(fuliaocaizhiUrl, {}).then(response => {
        that.fuliaocaizhiList = response.data.data
      })
      // 弹力
      const tanliUrl = '/app/dict/elastic_degree'
      queryShangPinFenLei(tanliUrl, {}).then(response => {
        that.tanliList = response.data.data
      })
      // 宽度分类 kuandufeneleiList
      const kuandufenleiUrl = '/app/dict/width_class'
      queryShangPinFenLei(kuandufenleiUrl, {}).then(response => {
        that.kuandufeneleiList = response.data.data
      })
      // 杯型厚度 beixingList
      const beixingUrl = '/app/dict/cup_thickness'
      queryShangPinFenLei(beixingUrl, {}).then(response => {
        that.beixingList = response.data.data
      })
      // 包装材质 baozhuangList
      const baozhuangUrl = '/app/dict/wrapper_texture'
      queryShangPinFenLei(baozhuangUrl, {}).then(response => {
        that.baozhuangList = response.data.data
      })
    },
    methods: {
      filterValToWord(val, list) {
        let str = ''
        list.forEach(item => {
          if (val === item.value) {
            str = item.description
          }
        })
        return str
      },
      filterIdToRemark(val, list) {
        let str = ''
        list.forEach(item => {
          if (Number(val) === item.id) {
            str = item.remark
          }
        })
        return str
      },
      transformGoods(item) {
        this.$router.push({
          path: '/goods/publish_pc',
          query: {
            id: item.id
          }
        })
      }, // 转发商品
      getGoodsList() {
        const that = this
        that.listQuery.source = that.type
        queryGoodsList(that.queryUrl, that.listQuery).then(response => {
          that.listLoading = false
          that.list = response.data.data.records
          that.total = response.data.data.total
        })
      },
      searchinformation() {
        const that = this
        that.getGoodsList()
      },
      handleChangeType() { // 切换类型
        this.listQuery.pageNo = 1
        this.getGoodsList()
      },
      cancel() {
        const that = this
        that.infoDialog = false
        that.pcDetailDialog = false
      },
      // 审核信息
      shenheInfo() {
        const that = this
        if (that.good_audit && (that.goodDetail.auditStatus === '0' || that.goodDetail.examine === '0')) {
          const para = {
            id: that.id,
            source: that.type,
            status: that.status
          }
          getShenHe(para).then(response => {
            that.getGoodsList()
            that.infoDialog = false
            that.pcDetailDialog = false
          })
        } else {
          that.infoDialog = false
          that.pcDetailDialog = false
        }
      },
      handleCurrentChange(val) { // 页码切换
        this.listQuery.pageNo = val
        this.getGoodsList()
      },
      handleSizeChange(val) { // 页面大小切换
        this.listQuery.pageSize = val
        this.getGoodsList()
      },
      // 点击查看出现弹框
      handleCheckDetail(row) {
        const that = this
        const url = '/app/operateGoods' + '/' + row.id + '/' + that.type
        that.id = row.id
        getGoodDetail(url, {}).then(response => {
          console.log(response)
          const data = response.data.data
          if (that.type === '1') {
            that.goodDetail = data.goodsDetail
            that.getDetailInfo()
            that.infoDialog = true
          } else {
            that.goodDetail = data.mallGoodsDetail
            // 适用人群
            querySuitPeople().then(res => {
              that.suitPeople = res.data.data
            })
            // 获取款式
            querySuitPeopleKind(that.goodDetail.categoryId).then(res => {
              that.kindList = res.data.data
            })
            // 获取风格
            queryStyleList().then(res => {
              that.styleList = res.data.data
            })
            that.goodDetail.imgList.forEach(item => {
              if (item.type === 'carousel') {
                that.productImgList.push(item)
              } else if (item.type === 'particulars') {
                that.detailImgList.push(item)
              }
            })
            that.goodDetail.characteristicList = that.goodDetail.characteristicList.join(',')
            that.goodDetail.materialList = that.goodDetail.materialList.join(',')
            that.goodDetail.sizeList = that.goodDetail.sizeList.join(',')
            that.pcDetailDialog = true
          }
          that.status = '1'
        })
      },
      changeGoodsStatus(row) {
        const that = this
        const url = '/app/operateGoods/putOrOut'
        const obj = {
          id: row.id
        }
        obj.source = that.type === '1' ? '1' : '2'
        getUnderRange(url, obj).then(response => {
          that.getGoodsList()
        })
      }, // 商品上下架
      shanchu(row) {
        const that = this
        that.$confirm(
          '确定删除该商品?',
          '提示',
          {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
            type: 'warning'
          }
        ).then(() => {
          const url = '/app/operateGoods/deleteGoods'
          const obj = {
            id: row.id
          }
          obj.source = that.type === '1' ? '1' : '2'
          deleteGood(url, obj).then(response => {
            that.getGoodsList()
          })
        })
      }, // 删除
      getDetailInfo() {
        const that = this
        if (that.goodDetail) {
          if (that.goodDetail.atype) {
            const atypeUrl = '/app/yykGoodsType' + '/' + that.goodDetail.atype
            goodsTypeTree(atypeUrl, {}).then(response => {
              that.goodDetail.atype = response.data.data.value
            })
            if (that.goodDetail.atype === '1' && that.goodDetail.atype) {
              that.mianliaoShow = true
              const mianliaoUrl = '/app/yykGoodsType/goodsTypeTree/1'
              goodsTypeTree(mianliaoUrl, {}).then(responce => {
                that.buLiaoList = responce.data.data
              })
              const btypeUrl = '/app/yykGoodsType' + '/' + that.goodDetail.btype
              goodsTypeTree(btypeUrl, {}).then(response => {
                that.goodDetail.btype = response.data.data.value
              })
              const ctypeUrl = '/app/yykGoodsType' + '/' + that.goodDetail.ctype
              goodsTypeTree(ctypeUrl, {}).then(response => {
                that.zileimuType = response.data.data.value
              })
              // 素色布
              if (that.goodDetail.btype && that.goodDetail.btype === '9') {
                that.goodsCType = ''
                that.color = ''
                that.bianzhiShow = true // 编织工艺
                that.pantongShow = true // 潘通色号
                that.kezhongShow = true // 克重
                that.yuanliaoShow = true // 原料纱支
                that.chengbenShow = true // 成分比例
                that.guangzeShow = true // 光泽
                that.fukuanShow = true // 幅宽
                that.baozhuangShow = false // 包装材质
                that.guigecicunShow = false // 规格尺寸
                that.tiebuShow = false // 贴布材质
                that.beixingShow = false // 杯型厚度
                that.xinghaoShow = false // 规格型号
                that.chicunShow = false // 拉链尺寸
                that.kuandufenleiShow = false // 宽度分类
                that.huagaoShow = false // 花高
                that.tanliShow = false // 弹力
                that.caizhiShow = false // 材质
                that.qitaShow = false // 其他参数
                that.hanjiaoShow = false // 含胶量
                that.houduShow = false // 厚度
                that.kuanduShow = false // 宽度
                that.huaxingShow = false // 花型尺寸
                that.shengchanShow = false // 生产工艺
                that.latouShow = false // 拉头工艺
                that.leibieShow = false // 类别
                that.gongChangDiZhiShow = false // 工厂地址展示
                const mianliaoUrl = '/app/yykGoodsType/goodsTypeTree/9'
                goodsTypeTree(mianliaoUrl, {}).then(responce => {
                  that.childrenTypeList = responce.data.data
                })
                const suseUrl = '/app/dict/shads_cloth'
                queryShangPinFenLei(suseUrl, {}).then(response => {
                  that.shangPinFenLeiList = response.data.data
                })
                const fenleiparams = {
                  value: that.goodDetail.parameter.goodsCType,
                  type: 'shads_cloth'
                }
                getInfo(fenleiparams).then(response => {
                  that.goodsCType = response.data.data.value
                })
              }
              // 印花
              if (that.goodDetail.btype && that.goodDetail.btype === '10') {
                that.bianzhiShow = true // 编织工艺
                that.leibieShow = true // 类别
                that.huaxingShow = true // 花型尺寸
                that.guangzeShow = true // 光泽
                that.kezhongShow = true // 克重
                that.yuanliaoShow = true // 原料纱支
                that.chengbenShow = true // 成分比例
                that.fukuanShow = true // 幅宽
                that.pantongShow = false // 潘通色号
                that.baozhuangShow = false // 包装材质
                that.guigecicunShow = false // 规格尺寸
                that.tiebuShow = false // 贴布材质
                that.beixingShow = false // 杯型厚度
                that.xinghaoShow = false // 规格型号
                that.chicunShow = false // 杯型厚度
                that.kuandufenleiShow = false // 宽度分类
                that.huagaoShow = false // 花高
                that.tanliShow = false // 弹力
                that.caizhiShow = false // 材质
                that.qitaShow = false // 其他参数
                that.hanjiaoShow = false // 含胶量
                that.houduShow = false // 厚度
                that.kuanduShow = false // 宽度
                that.shengchanShow = false // 生产工艺
                that.latouShow = false // 拉头工艺
                that.gongChangDiZhiShow = false // 工厂地址展示
                const mianliaoUrl = '/app/yykGoodsType/goodsTypeTree/10'
                goodsTypeTree(mianliaoUrl, {}).then(responce => {
                  that.childrenTypeList = responce.data.data
                })
                const fenleiparams = {
                  value: that.goodDetail.parameter.goodsCType,
                  type: 'print_face_cloth'
                }
                getInfo(fenleiparams).then(response => {
                  that.goodsCType = response.data.data.value
                })
                const leibieparams = {
                  value: that.goodDetail.parameter.goodsDType,
                  type: 'printing_cloth_type'
                }
                getInfo(leibieparams).then(response => {
                  that.goodsDType = response.data.data.value
                })
                const suseUrl = '/app/dict/print_face_cloth'
                queryShangPinFenLei(suseUrl, {}).then(response => {
                  that.shangPinFenLeiList = response.data.data
                })
                const liebieUrl = '/app/dict/printing_cloth_type'
                queryShangPinFenLei(liebieUrl, {}).then(response => {
                  that.shangpinLieBieList = response.data.data
                })
              }
              // 提花
              if (that.goodDetail.btype && that.goodDetail.btype === '11') {
                that.bianzhiShow = true // 编织工艺
                that.guangzeShow = true // 光泽
                that.kezhongShow = true // 克重
                that.yuanliaoShow = true // 原料纱支
                that.chengbenShow = true // 成分比例
                that.fukuanShow = true // 幅宽
                that.pantongShow = true // 潘通色号
                that.huaxingShow = false // 花型尺寸
                that.pantongShow = false // 潘通色号
                that.baozhuangShow = false // 包装材质
                that.guigecicunShow = false // 规格尺寸
                that.leibieShow = false // 类别
                that.tiebuShow = false // 贴布材质
                that.beixingShow = false // 杯型厚度
                that.xinghaoShow = false // 规格型号
                that.chicunShow = false // 杯型厚度
                that.kuandufenleiShow = false // 宽度分类
                that.huagaoShow = false // 花高
                that.tanliShow = false // 弹力
                that.caizhiShow = false // 材质
                that.qitaShow = false // 其他参数
                that.hanjiaoShow = false // 含胶量
                that.houduShow = false // 厚度
                that.kuanduShow = false // 宽度
                that.shengchanShow = false // 生产工艺
                that.latouShow = false // 拉头工艺
                that.gongChangDiZhiShow = false // 工厂地址展示
                const mianliaoUrl = '/app/yykGoodsType/goodsTypeTree/11'
                goodsTypeTree(mianliaoUrl, {}).then(responce => {
                  that.childrenTypeList = responce.data.data
                })
                const fenleiparams = {
                  value: that.goodDetail.parameter.goodsCType,
                  type: 'jacquard_face_cloth'
                }
                getInfo(fenleiparams).then(response => {
                  that.goodsCType = response.data.data.value
                })
                const suseUrl = '/app/dict/jacquard_face_cloth'
                queryShangPinFenLei(suseUrl, {}).then(response => {
                  that.shangPinFenLeiList = response.data.data
                })
              }
              // 里布
              if (that.goodDetail.btype && that.goodDetail.btype === '2') {
                that.bianzhiShow = true // 编织工艺
                that.leibieShow = true // 类别
                that.guangzeShow = true // 光泽
                that.kezhongShow = true // 克重
                that.yuanliaoShow = true // 原料纱支
                that.chengbenShow = true // 成分比例
                that.fukuanShow = true // 幅宽
                that.pantongShow = true // 潘通色号
                that.huaxingShow = false // 花型尺寸
                that.pantongShow = false // 潘通色号
                that.baozhuangShow = false // 包装材质
                that.guigecicunShow = false // 规格尺寸
                that.tiebuShow = false // 贴布材质
                that.beixingShow = false // 杯型厚度
                that.xinghaoShow = false // 规格型号
                that.chicunShow = false // 拉链尺寸
                that.kuandufenleiShow = false // 宽度分类
                that.huagaoShow = false // 花高
                that.tanliShow = false // 弹力
                that.caizhiShow = false // 材质
                that.qitaShow = false // 其他参数
                that.hanjiaoShow = false // 含胶量
                that.houduShow = false // 厚度
                that.kuanduShow = false // 宽度
                that.shengchanShow = false // 生产工艺
                that.latouShow = false // 拉头工艺
                const mianliaoUrl = '/app/yykGoodsType/goodsTypeTree/2'
                goodsTypeTree(mianliaoUrl, {}).then(responce => {
                  that.childrenTypeList = responce.data.data
                })
                const fenleiparams = {
                  value: that.goodDetail.parameter.goodsCType,
                  type: 'inside_cloth'
                }
                getInfo(fenleiparams).then(response => {
                  that.goodsCType = response.data.data.value
                })
                const leibieparams = {
                  value: that.goodDetail.parameter.goodsDType,
                  type: 'inside_cloth_type'
                }
                getInfo(leibieparams).then(response => {
                  that.goodsDType = response.data.data.value
                })
                const suseUrl = '/app/dict/inside_cloth'
                queryShangPinFenLei(suseUrl, {}).then(response => {
                  that.shangPinFenLeiList = response.data.data
                })
                const liebieUrl = '/app/dict/inside_cloth_type'
                queryShangPinFenLei(liebieUrl, {}).then(response => {
                  that.shangpinLieBieList = response.data.data
                })
              }
            } else {
              that.mianliaoShow = false
              const btypeUrl = '/app/yykGoodsType' + '/' + that.goodDetail.btype
              goodsTypeTree(btypeUrl, {}).then(response => {
                that.zileimuType = response.data.data.value
              })
              if (that.goodDetail.atype && that.goodDetail.atype === '3') {
                const suseUrl = '/app/dict/accessory'
                queryShangPinFenLei(suseUrl, {}).then(response => {
                  that.shangPinFenLeiList = response.data.data
                })
                const fenleiparams = {
                  value: that.goodDetail.parameter.goodsCType,
                  type: 'accessory'
                }
                getInfo(fenleiparams).then(response => {
                  that.goodsCType = response.data.data.value
                })
              }
              // 胸杯
              if (that.goodDetail.atype && that.goodDetail.atype === '4') {
                that.shengchanShow = true // 生产工艺
                that.leibieShow = true // 类别
                that.beixingShow = true // 杯型厚度
                that.qitaShow = true // 其他参数
                that.tiebuShow = true // 贴布材质
                that.kuandufenleiShow = false // 宽度分类
                that.fukuanShow = false // 幅宽
                that.huagaoShow = false// 花高
                that.caizhiShow = false // 材质
                that.kezhongShow = false// 克重
                that.tanliShow = false // 弹力
                that.guangzeShow = false // 光泽
                that.kuanduShow = false // 宽度
                that.yuanliaoShow = false // 原料纱支
                that.chengbenShow = false // 成分比例
                that.pantongShow = false // 潘通色号
                that.huaxingShow = false // 花型尺寸
                that.pantongShow = false // 潘通色号
                that.bianzhiShow = false // 编织工艺
                that.baozhuangShow = false // 包装材质
                that.guigecicunShow = false // 规格尺寸
                that.xinghaoShow = false // 规格型号
                that.chicunShow = false // 拉链尺寸
                that.hanjiaoShow = false // 含胶量
                that.houduShow = false // 厚度
                that.latouShow = false // 拉头工艺
                const mianliaoUrl = '/app/yykGoodsType/goodsTypeTree/4'
                goodsTypeTree(mianliaoUrl, {}).then(responce => {
                  that.childrenTypeList = responce.data.data
                })
                const fenleiparams = {
                  value: that.goodDetail.parameter.goodsCType,
                  type: 'thoracic_cup'
                }
                getInfo(fenleiparams).then(response => {
                  that.goodsCType = response.data.data.value
                })
                const leibieparams = {
                  value: that.goodDetail.parameter.goodsDType,
                  type: 'inside_cloth_type'
                }
                getInfo(leibieparams).then(response => {
                  that.goodsDType = response.data.data.value
                })
                const suseUrl = '/app/dict/thoracic_cup'
                queryShangPinFenLei(suseUrl, {}).then(response => {
                  that.shangPinFenLeiList = response.data.data
                })
                const liebieUrl = '/app/dict/thoracic_cup_type'
                queryShangPinFenLei(liebieUrl, {}).then(response => {
                  that.shangpinLieBieList = response.data.data
                })
              }
              // 扣类
              if (that.goodDetail.atype && that.goodDetail.atype === '6') {
                that.guigecicunShow = true // 规格尺寸
                that.qitaShow = true // 其他参数
                that.shengchanShow = false // 生产工艺
                that.leibieShow = false // 类别
                that.beixingShow = false // 杯型厚度
                that.tiebuShow = false // 贴布材质
                that.kuandufenleiShow = false // 宽度分类
                that.fukuanShow = false // 幅宽
                that.huagaoShow = false// 花高
                that.caizhiShow = false // 材质
                that.kezhongShow = false// 克重
                that.tanliShow = false // 弹力
                that.guangzeShow = false // 光泽
                that.kuanduShow = false // 宽度
                that.yuanliaoShow = false // 原料纱支
                that.chengbenShow = false // 成分比例
                that.pantongShow = false // 潘通色号
                that.huaxingShow = false // 花型尺寸
                that.pantongShow = false // 潘通色号
                that.bianzhiShow = false // 编织工艺
                that.baozhuangShow = false // 包装材质
                that.xinghaoShow = false // 规格型号
                that.chicunShow = false // 拉链尺寸
                that.hanjiaoShow = false // 含胶量
                that.houduShow = false // 厚度
                that.latouShow = false // 拉头工艺
                const fenleiparams = {
                  value: that.goodDetail.parameter.goodsCType,
                  type: 'fastener_type'
                }
                getInfo(fenleiparams).then(response => {
                  that.goodsCType = response.data.data.value
                })
                const suseUrl = '/app/dict/fastener_type'
                queryShangPinFenLei(suseUrl, {}).then(response => {
                  that.shangPinFenLeiList = response.data.data
                })
              }
              // 包装材料
              if (that.goodDetail.atype && that.goodDetail.atype === '7') {
                that.guigecicunShow = true // 规格尺寸
                that.qitaShow = true // 其他参数
                that.baozhuangShow = true // 包装材质
                that.shengchanShow = false // 生产工艺
                that.leibieShow = false // 类别
                that.beixingShow = false // 杯型厚度
                that.tiebuShow = false // 贴布材质
                that.kuandufenleiShow = false // 宽度分类
                that.fukuanShow = false // 幅宽
                that.huagaoShow = false// 花高
                that.caizhiShow = false // 材质
                that.kezhongShow = false// 克重
                that.tanliShow = false // 弹力
                that.guangzeShow = false // 光泽
                that.kuanduShow = false // 宽度
                that.yuanliaoShow = false // 原料纱支
                that.chengbenShow = false // 成分比例
                that.pantongShow = false // 潘通色号
                that.huaxingShow = false // 花型尺寸
                that.pantongShow = false // 潘通色号
                that.bianzhiShow = false // 编织工艺
                that.xinghaoShow = false // 规格型号
                that.chicunShow = false // 拉链尺寸
                that.hanjiaoShow = false // 含胶量
                that.houduShow = false // 厚度
                that.latouShow = false // 拉头工艺
              }
              // 其他
              if (that.goodDetail.atype && that.goodDetail.atype === '8') {
                that.guigecicunShow = true // 规格尺寸
                that.qitaShow = true // 其他参数
                that.caizhiShow = false // 材质
                that.baozhuangShow = false // 包装材质
                that.shengchanShow = false // 生产工艺
                that.leibieShow = false // 类别
                that.beixingShow = false // 杯型厚度
                that.tiebuShow = false // 贴布材质
                that.kuandufenleiShow = false // 宽度分类
                that.fukuanShow = false // 幅宽
                that.huagaoShow = false// 花高
                that.kezhongShow = false// 克重
                that.tanliShow = false // 弹力
                that.guangzeShow = false // 光泽
                that.kuanduShow = false // 宽度
                that.yuanliaoShow = false // 原料纱支
                that.chengbenShow = false // 成分比例
                that.pantongShow = false // 潘通色号
                that.huaxingShow = false // 花型尺寸
                that.pantongShow = false // 潘通色号
                that.bianzhiShow = false // 编织工艺
                that.xinghaoShow = false // 规格型号
                that.chicunShow = false // 拉链尺寸
                that.hanjiaoShow = false // 含胶量
                that.houduShow = false // 厚度
                that.latouShow = false // 拉头工艺
                const fenleiparams = {
                  value: that.goodDetail.parameter.goodsCType,
                  type: 'other_type'
                }
                getInfo(fenleiparams).then(response => {
                  that.goodsCType = response.data.data.value
                })
                const suseUrl = '/app/dict/other_type'
                queryShangPinFenLei(suseUrl, {}).then(response => {
                  that.shangPinFenLeiList = response.data.data
                })
              }
              // 松紧带
              if (that.goodDetail.atype === '3' && that.goodDetail.btype === '16') {
                that.leibieShow = true // 类别
                that.caizhiShow = true // 材质
                that.kuanduShow = true // 宽度
                that.tanliShow = true // 弹力
                that.qitaShow = true // 其他参数
                that.guangzeShow = false // 光泽
                that.kezhongShow = false // 克重
                that.yuanliaoShow = false // 原料纱支
                that.chengbenShow = false // 成分比例
                that.fukuanShow = false // 幅宽
                that.pantongShow = false // 潘通色号
                that.huaxingShow = false // 花型尺寸
                that.pantongShow = false // 潘通色号
                that.bianzhiShow = false // 编织工艺
                that.baozhuangShow = false // 包装材质
                that.guigecicunShow = false // 规格尺寸
                that.tiebuShow = false // 贴布材质
                that.beixingShow = false // 杯型厚度
                that.xinghaoShow = false // 规格型号
                that.chicunShow = false // 拉链尺寸
                that.kuandufenleiShow = false // 宽度分类
                that.huagaoShow = false // 花高
                that.hanjiaoShow = false // 含胶量
                that.houduShow = false // 厚度
                that.shengchanShow = false // 生产工艺
                that.latouShow = false // 拉头工艺
                const leibieparams = {
                  value: that.goodDetail.parameter.goodsDType,
                  type: 'elastic_type'
                }
                getInfo(leibieparams).then(response => {
                  that.goodsDType = response.data.data.value
                })
                const liebieUrl = '/app/dict/elastic_type'
                queryShangPinFenLei(liebieUrl, {}).then(response => {
                  that.shangpinLieBieList = response.data.data
                })
              }
              // 花边
              if (that.goodDetail.atype === '3' && that.goodDetail.btype === '17') {
                that.leibieShow = true // 类别
                that.kuandufenleiShow = true // 宽度分类
                that.fukuanShow = true // 幅宽
                that.huagaoShow = true// 花高
                that.caizhiShow = true // 材质
                that.kezhongShow = true// 克重
                that.tanliShow = true // 弹力
                that.qitaShow = false // 其他参数
                that.guangzeShow = false // 光泽
                that.kuanduShow = false // 宽度
                that.yuanliaoShow = false // 原料纱支
                that.chengbenShow = false // 成分比例
                that.pantongShow = false // 潘通色号
                that.huaxingShow = false // 花型尺寸
                that.pantongShow = false // 潘通色号
                that.bianzhiShow = false // 编织工艺
                that.baozhuangShow = false // 包装材质
                that.guigecicunShow = false // 规格尺寸
                that.tiebuShow = false // 贴布材质
                that.beixingShow = false // 杯型厚度
                that.xinghaoShow = false // 规格型号
                that.chicunShow = false // 拉链尺寸
                that.hanjiaoShow = false // 含胶量
                that.houduShow = false // 厚度
                that.shengchanShow = false // 生产工艺
                that.latouShow = false // 拉头工艺
                const leibieparams = {
                  value: that.goodDetail.parameter.goodsDType,
                  type: 'lace_type'
                }
                getInfo(leibieparams).then(response => {
                  that.goodsDType = response.data.data.value
                })
                const liebieUrl = '/app/dict/lace_type'
                queryShangPinFenLei(liebieUrl, {}).then(response => {
                  that.shangpinLieBieList = response.data.data
                })
              }
              // 织带
              if (that.goodDetail.atype === '3' && that.goodDetail.btype === '18') {
                that.leibieShow = true // 类别
                that.kuanduShow = true // 宽度
                that.caizhiShow = true // 材质
                that.tanliShow = true // 弹力
                that.qitaShow = true // 其他参数
                that.kezhongShow = false// 克重
                that.guangzeShow = false // 光泽
                that.fukuanShow = false // 幅宽
                that.huagaoShow = false// 花高
                that.kuandufenleiShow = false // 宽度分类
                that.yuanliaoShow = false // 原料纱支
                that.chengbenShow = false // 成分比例
                that.pantongShow = false // 潘通色号
                that.huaxingShow = false // 花型尺寸
                that.pantongShow = false // 潘通色号
                that.bianzhiShow = false // 编织工艺
                that.baozhuangShow = false // 包装材质
                that.guigecicunShow = false // 规格尺寸
                that.tiebuShow = false // 贴布材质
                that.beixingShow = false // 杯型厚度
                that.xinghaoShow = false // 规格型号
                that.chicunShow = false // 拉链尺寸
                that.hanjiaoShow = false // 含胶量
                that.houduShow = false // 厚度
                that.shengchanShow = false // 生产工艺
                that.latouShow = false // 拉头工艺
                const leibieparams = {
                  value: that.goodDetail.parameter.goodsDType,
                  type: 'ribbon_type'
                }
                getInfo(leibieparams).then(response => {
                  that.goodsDType = response.data.data.value
                })
                const liebieUrl = '/app/dict/ribbon_type'
                queryShangPinFenLei(liebieUrl, {}).then(response => {
                  that.shangpinLieBieList = response.data.data
                })
              }
              // 拉链
              if (that.goodDetail.atype === '3' && that.goodDetail.btype === '20') {
                that.leibieShow = true // 类别
                that.chicunShow = true // 拉链尺寸
                that.caizhiShow = true // 材质
                that.latouShow = true // 拉头工艺
                that.qitaShow = true // 其他参数
                that.tanliShow = false // 弹力
                that.kezhongShow = false// 克重
                that.guangzeShow = false // 光泽
                that.fukuanShow = false // 幅宽
                that.kuanduShow = false // 宽度
                that.huagaoShow = false// 花高
                that.kuandufenleiShow = false // 宽度分类
                that.yuanliaoShow = false // 原料纱支
                that.chengbenShow = false // 成分比例
                that.pantongShow = false // 潘通色号
                that.huaxingShow = false // 花型尺寸
                that.pantongShow = false // 潘通色号
                that.bianzhiShow = false // 编织工艺
                that.baozhuangShow = false // 包装材质
                that.guigecicunShow = false // 规格尺寸
                that.tiebuShow = false // 贴布材质
                that.beixingShow = false // 杯型厚度
                that.xinghaoShow = false // 规格型号
                that.hanjiaoShow = false // 含胶量
                that.houduShow = false // 厚度
                that.shengchanShow = false // 生产工艺
                const leibieparams = {
                  value: that.goodDetail.parameter.goodsDType,
                  type: 'zipper_type'
                }
                getInfo(leibieparams).then(response => {
                  that.goodsDType = response.data.data.value
                })
                const liebieUrl = '/app/dict/zipper_type'
                queryShangPinFenLei(liebieUrl, {}).then(response => {
                  that.shangpinLieBieList = response.data.data
                })
              }
              // 其他
              if (that.goodDetail.atype === '3' && that.goodDetail.btype === '21') {
                that.xinghaoShow = true // 规格型号
                that.caizhiShow = true // 材质
                that.qitaShow = true // 其他参数
                that.tanliShow = true // 弹力
                that.latouShow = false // 拉头工艺
                that.chicunShow = false // 拉链尺寸
                that.leibieShow = false // 类别
                that.kezhongShow = false// 克重
                that.guangzeShow = false // 光泽
                that.fukuanShow = false // 幅宽
                that.kuanduShow = false // 宽度
                that.huagaoShow = false// 花高
                that.kuandufenleiShow = false // 宽度分类
                that.yuanliaoShow = false // 原料纱支
                that.chengbenShow = false // 成分比例
                that.pantongShow = false // 潘通色号
                that.huaxingShow = false // 花型尺寸
                that.pantongShow = false // 潘通色号
                that.bianzhiShow = false // 编织工艺
                that.baozhuangShow = false // 包装材质
                that.guigecicunShow = false // 规格尺寸
                that.tiebuShow = false // 贴布材质
                that.beixingShow = false // 杯型厚度
                that.hanjiaoShow = false // 含胶量
                that.houduShow = false // 厚度
                that.shengchanShow = false // 生产工艺
                // const leibieparams = {
                //   value: that.goodDetail.parameter.goodsDType,
                //   type: 'lace_type'
                // }
                // getInfo(leibieparams).then(response => {
                //   that.form.goodsDType = response.data.data.value
                // })
              }
              // 橡皮
              if (that.goodDetail.atype === '3' && that.goodDetail.btype === '47') {
                that.hanjiaoShow = true // 含胶量
                that.kuanduShow = true // 宽度
                that.houduShow = true // 厚度
                that.qitaShow = true // 其他参数
                that.tanliShow = false // 弹力
                that.caizhiShow = false // 材质
                that.latouShow = false // 拉头工艺
                that.xinghaoShow = false // 规格型号
                that.chicunShow = false // 拉链尺寸
                that.leibieShow = false // 类别
                that.kezhongShow = false// 克重
                that.guangzeShow = false // 光泽
                that.fukuanShow = false // 幅宽
                that.huagaoShow = false// 花高
                that.kuandufenleiShow = false // 宽度分类
                that.yuanliaoShow = false // 原料纱支
                that.chengbenShow = false // 成分比例
                that.pantongShow = false // 潘通色号
                that.huaxingShow = false // 花型尺寸
                that.pantongShow = false // 潘通色号
                that.bianzhiShow = false // 编织工艺
                that.baozhuangShow = false // 包装材质
                that.guigecicunShow = false // 规格尺寸
                that.tiebuShow = false // 贴布材质
                that.beixingShow = false // 杯型厚度
                that.shengchanShow = false // 生产工艺
              }
              // 胸杯 胸杯
              if (that.goodDetail.atype === '3' && that.goodDetail.btype === '45') {
                const leibieparams = {
                  value: that.goodDetail.parameter.goodsDType,
                  type: 'thoracic_cup_type'
                }
                getInfo(leibieparams).then(response => {
                  that.goodsDType = response.data.data.value
                })
                const liebieUrl = '/app/dict/thoracic_cup_type'
                queryShangPinFenLei(liebieUrl, {}).then(response => {
                  that.shangpinLieBieList = response.data.data
                })
              }
              // 胸杯 - 钢圈
              if (that.goodDetail.atype === '3' && that.goodDetail.btype === '49') {
                const leibieparams = {
                  value: that.goodDetail.parameter.goodsDType,
                  type: 'steel_rim'
                }
                getInfo(leibieparams).then(response => {
                  that.goodsDType = response.data.data.value
                })
                const liebieUrl = '/app/dict/steel_rim'
                queryShangPinFenLei(liebieUrl, {}).then(response => {
                  that.shangpinLieBieList = response.data.data
                })
              }
              // 胸杯 - 杯垫
              if (that.goodDetail.atype === '3' && that.goodDetail.btype === '50') {
                const leibieparams = {
                  value: that.goodDetail.parameter.goodsDType,
                  type: 'thoracic_cup_coaster'
                }
                getInfo(leibieparams).then(response => {
                  that.goodsDType = response.data.data.value
                })
                const liebieUrl = '/app/dict/thoracic_cup_coaster'
                queryShangPinFenLei(liebieUrl, {}).then(response => {
                  that.shangpinLieBieList = response.data.data
                })
              }
              // 包装材料-衣架
              if (that.goodDetail.atype === '7' && that.goodDetail.btype === '24') {
                const fenleiparams = {
                  value: that.goodDetail.parameter.goodsCType,
                  type: 'wrapper_hanger'
                }
                getInfo(fenleiparams).then(response => {
                  that.goodsCType = response.data.data.value
                })
                const suseUrl = '/app/dict/wrapper_hanger'
                queryShangPinFenLei(suseUrl, {}).then(response => {
                  that.shangPinFenLeiList = response.data.data
                })
              }
              // 包装材料-商标
              if (that.goodDetail.atype === '7' && that.goodDetail.btype === '25') {
                const fenleiparams = {
                  value: that.goodDetail.parameter.goodsCType,
                  type: 'wrapper_trademark'
                }
                getInfo(fenleiparams).then(response => {
                  that.goodsCType = response.data.data.value
                })
                const suseUrl = '/app/dict/wrapper_trademark'
                queryShangPinFenLei(suseUrl, {}).then(response => {
                  that.shangPinFenLeiList = response.data.data
                })
              }
              // 包装材料-吊牌
              if (that.goodDetail.atype === '7' && that.goodDetail.btype === '26') {
                const fenleiparams = {
                  value: that.goodDetail.parameter.goodsCType,
                  type: 'wrapper_tag'
                }
                getInfo(fenleiparams).then(response => {
                  that.goodsCType = response.data.data.value
                })
                const suseUrl = '/app/dict/wrapper_tag'
                queryShangPinFenLei(suseUrl, {}).then(response => {
                  that.shangPinFenLeiList = response.data.data
                })
              }
              // 包装材料-塑料袋
              if (that.goodDetail.atype === '7' && that.goodDetail.btype === '27') {
                const fenleiparams = {
                  value: that.goodDetail.parameter.goodsCType,
                  type: 'wrapper_plastic_bag'
                }
                getInfo(fenleiparams).then(response => {
                  that.goodsCType = response.data.data.value
                })
                const suseUrl = '/app/dict/wrapper_plastic_bag'
                queryShangPinFenLei(suseUrl, {}).then(response => {
                  that.shangPinFenLeiList = response.data.data
                })
              }
              // 包装材料-裆贴
              if (that.goodDetail.atype === '7' && that.goodDetail.btype === '28') {
                const fenleiparams = {
                  value: that.goodDetail.parameter.goodsCType,
                  type: 'wrapper_paper'
                }
                getInfo(fenleiparams).then(response => {
                  that.goodsCType = response.data.data.value
                })
                const suseUrl = '/app/dict/wrapper_paper'
                queryShangPinFenLei(suseUrl, {}).then(response => {
                  that.shangPinFenLeiList = response.data.data
                })
              }
              // 包装材料-纸箱
              if (that.goodDetail.atype === '7' && that.goodDetail.btype === '29') {
                const fenleiparams = {
                  value: that.goodDetail.parameter.goodsCType,
                  type: 'wrapper_carton'
                }
                getInfo(fenleiparams).then(response => {
                  that.goodsCType = response.data.data.value
                })
                const suseUrl = '/app/dict/wrapper_carton'
                queryShangPinFenLei(suseUrl, {}).then(response => {
                  that.shangPinFenLeiList = response.data.data
                })
              }
            }
          }
          // that.pictureList[0].url.push(that.goodDetail.topPicture)
          if (that.goodDetail.detailImgs && that.goodDetail.detailImgs.length > 0) {
            that.picArr = that.goodDetail.detailImgs.split(',')
          } else {
            that.picArr = []
          }
          that.pictureList = []
          // const arr = that.goodDetail.detailImgs.split(',')
          for (let i = 0; i < that.picArr.length; i++) {
            const obj = {
              url: that.picArr[i]
            }
            that.pictureList.push(obj)
          }
          if (that.goodDetail.goodsName) {
            that.goodDetail.goodsName = that.goodDetail.goodsName
          }
          // if (that.goodDetail.priceUnit) {
          //   that.priceUnitList.forEach(item => {
          //     if (that.goodDetail.priceUnit === item.description) {
          //       that.priceUnit = item.value
          //     }
          //   })
          // } else {
          //   that.priceUnit = ''
          // }
          if (that.goodDetail.goodsNo) {
            that.goodDetail.goodsNo = that.goodDetail.goodsNo
          }
          if (that.goodDetail.price) {
            that.goodDetail.price = that.goodDetail.price
          }
          if (that.goodDetail.discountPrice) {
            that.goodDetail.discountPrice = that.goodDetail.discountPrice
          }
          that.goodDetail.inventory = that.goodDetail.inventory
          if (that.goodDetail.parameter && that.goodDetail.parameter.productionProcess) {
            that.goodDetail.productionProcess = that.goodDetail.parameter.productionProcess
          }
          if (that.goodDetail.parameter && that.goodDetail.parameter.zipperType) {
            that.goodDetail.zipperType = that.goodDetail.parameter.zipperType
          }
          if (that.goodDetail.parameter && that.goodDetail.parameter.specificationModel) {
            that.goodDetail.specificationModel = that.goodDetail.parameter.specificationModel
          }
          if (that.goodDetail.parameter && that.goodDetail.parameter.thickness) {
            that.goodDetail.thickness = that.goodDetail.parameter.thickness
          }
          if (that.goodDetail.parameter && that.goodDetail.parameter.patchMaterial) {
            that.goodDetail.patchMaterial = that.goodDetail.parameter.patchMaterial
          }
          if (that.goodDetail.parameter && that.goodDetail.parameter.flowerHigh) {
            that.goodDetail.flowerHigh = that.goodDetail.parameter.flowerHigh
          }
          if (that.goodDetail.parameter && that.goodDetail.parameter.size) {
            that.goodDetail.size = that.goodDetail.parameter.size
          }
          if (that.goodDetail.parameter && that.goodDetail.parameter.buyType) {
            that.goodDetail.buyType = that.goodDetail.parameter.buyType
          }
          if (that.goodDetail.color) {
            const params = {
              value: that.goodDetail.color,
              type: 'color'
            }
            getInfo(params).then(response => {
              that.color = response.data.data.value
            })
          }
          if (that.goodDetail.parameter && that.goodDetail.parameter.rawYarn) {
            const params = {
              value: that.goodDetail.parameter.rawYarn,
              type: 'fabric_raw_yarn'
            }
            getInfo(params).then(response => {
              that.rawYarn = response.data.data.value
            })
          }
          if (that.goodDetail.parameter && that.goodDetail.parameter.cupThickness) {
            const params = {
              value: that.goodDetail.parameter.cupThickness,
              type: 'cup_thickness'
            }
            getInfo(params).then(response => {
              that.cupThickness = response.data.data.value
            })
          }
          if (that.goodDetail.parameter && that.goodDetail.parameter.glossiness) {
            const params = {
              value: that.goodDetail.parameter.glossiness,
              type: 'glossiness'
            }
            getInfo(params).then(response => {
              that.glossiness = response.data.data.value
            })
          }
          if (that.goodDetail.parameter && that.goodDetail.parameter.widthClass) {
            const params = {
              value: that.goodDetail.parameter.widthClass,
              type: 'width_class'
            }
            getInfo(params).then(response => {
              that.goodDetail.widthClass = response.data.data.value
            })
          }
          if (that.goodDetail.parameter && that.goodDetail.parameter.elasticDegree) {
            const params = {
              value: that.goodDetail.parameter.elasticDegree,
              type: 'elastic_degree'
            }
            getInfo(params).then(response => {
              that.goodDetail.elasticDegree = response.data.data.value
            })
          }
          if (that.goodDetail.parameter && that.goodDetail.parameter.wrapperMaterial) {
            const params = {
              value: that.goodDetail.parameter.wrapperMaterial,
              type: 'wrapper_texture'
            }
            getInfo(params).then(response => {
              that.goodDetail.wrapperMaterial = response.data.data.value
            })
          }
          if (that.goodDetail.parameter && that.goodDetail.parameter.material) {
            const params = {
              value: that.goodDetail.parameter.material,
              type: 'accessory_material'
            }
            getInfo(params).then(response => {
              that.goodDetail.material = response.data.data.value
            })
          }
          if (that.goodDetail.parameter && that.goodDetail.parameter.buyType) {
            that.goodDetail.buyType = that.goodDetail.parameter.buyType
          }
          if (that.goodDetail.parameter && that.goodDetail.parameter.otherParam) {
            that.goodDetail.otherParam = that.goodDetail.parameter.otherParam
          }
          if (that.goodDetail.parameter && that.goodDetail.parameter.rubberContent) {
            that.goodDetail.rubberContent = that.goodDetail.parameter.rubberContent
          }
          that.goodDetail.topPicture = that.goodDetail.topPicture
          // if (that.goodDetail.topPicture) {
          //   that.form.topPicture = that.goodDetail.topPicture
          // }
        }
      },
      // 修改发布信息
      // 类目改变
      changeGoodLeiMu(val) {
        const that = this
        that.clearParam()
        const url = '/app/yykGoodsType/goodsTypeTree/' + val
        queryShangPinLeiMu(url, {}).then(response => {
          if (val === 1) {
            that.mianliaoShow = true
            that.buLiaoList = response.data.data
          } else {
            that.mianliaoShow = false
            that.childrenTypeList = response.data.data
            // 辅料
            if (val === 3) {
              const fuliaoFenLei = '/app/dict/accessory'
              queryShangPinFenLei(fuliaoFenLei, {}).then(response => {
                that.shangPinFenLeiList = response.data.data
              })
            }
            // 胸杯
            if (val === 4) {
              that.shengchanShow = true // 生产工艺
              that.leibieShow = true // 类别
              that.beixingShow = true // 杯型厚度
              that.qitaShow = true // 其他参数
              that.tiebuShow = true // 贴布材质
              that.kuandufenleiShow = false // 宽度分类
              that.fukuanShow = false // 幅宽
              that.huagaoShow = false// 花高
              that.caizhiShow = false // 材质
              that.kezhongShow = false// 克重
              that.tanliShow = false // 弹力
              that.guangzeShow = false // 光泽
              that.kuanduShow = false // 宽度
              that.yuanliaoShow = false // 原料纱支
              that.chengbenShow = false // 成分比例
              that.pantongShow = false // 潘通色号
              that.huaxingShow = false // 花型尺寸
              that.pantongShow = false // 潘通色号
              that.bianzhiShow = false // 编织工艺
              that.baozhuangShow = false // 包装材质
              that.guigecicunShow = false // 规格尺寸
              that.xinghaoShow = false // 规格型号
              that.chicunShow = false // 拉链尺寸
              that.hanjiaoShow = false // 含胶量
              that.houduShow = false // 厚度
              that.latouShow = false // 拉头工艺
              const fuliaoFenLei = '/app/dict/thoracic_cup'
              queryShangPinFenLei(fuliaoFenLei, {}).then(response => {
                that.shangPinFenLeiList = response.data.data
              })
            }
            // 扣类
            if (val === 6) {
              that.guigecicunShow = true // 规格尺寸
              that.qitaShow = true // 其他参数
              that.shengchanShow = false // 生产工艺
              that.leibieShow = false // 类别
              that.beixingShow = false // 杯型厚度
              that.tiebuShow = false // 贴布材质
              that.kuandufenleiShow = false // 宽度分类
              that.fukuanShow = false // 幅宽
              that.huagaoShow = false// 花高
              that.caizhiShow = false // 材质
              that.kezhongShow = false// 克重
              that.tanliShow = false // 弹力
              that.guangzeShow = false // 光泽
              that.kuanduShow = false // 宽度
              that.yuanliaoShow = false // 原料纱支
              that.chengbenShow = false // 成分比例
              that.pantongShow = false // 潘通色号
              that.huaxingShow = false // 花型尺寸
              that.pantongShow = false // 潘通色号
              that.bianzhiShow = false // 编织工艺
              that.baozhuangShow = false // 包装材质
              that.xinghaoShow = false // 规格型号
              that.chicunShow = false // 拉链尺寸
              that.hanjiaoShow = false // 含胶量
              that.houduShow = false // 厚度
              that.latouShow = false // 拉头工艺
              const fuliaoFenLei = '/app/dict/fastener_type'
              queryShangPinFenLei(fuliaoFenLei, {}).then(response => {
                that.shangPinFenLeiList = response.data.data
              })
            }
            // 包装材料
            if (val === 7) {
              that.guigecicunShow = true // 规格尺寸
              that.qitaShow = true // 其他参数
              that.baozhuangShow = true // 包装材质
              that.shengchanShow = false // 生产工艺
              that.leibieShow = false // 类别
              that.beixingShow = false // 杯型厚度
              that.tiebuShow = false // 贴布材质
              that.kuandufenleiShow = false // 宽度分类
              that.fukuanShow = false // 幅宽
              that.huagaoShow = false// 花高
              that.caizhiShow = false // 材质
              that.kezhongShow = false// 克重
              that.tanliShow = false // 弹力
              that.guangzeShow = false // 光泽
              that.kuanduShow = false // 宽度
              that.yuanliaoShow = false // 原料纱支
              that.chengbenShow = false // 成分比例
              that.pantongShow = false // 潘通色号
              that.huaxingShow = false // 花型尺寸
              that.pantongShow = false // 潘通色号
              that.bianzhiShow = false // 编织工艺
              that.xinghaoShow = false // 规格型号
              that.chicunShow = false // 拉链尺寸
              that.hanjiaoShow = false // 含胶量
              that.houduShow = false // 厚度
              that.latouShow = false // 拉头工艺
            }
            // 其他
            if (val === 8) {
              that.guigecicunShow = true // 规格尺寸
              that.qitaShow = true // 其他参数
              that.caizhiShow = false // 材质
              that.baozhuangShow = false // 包装材质
              that.shengchanShow = false // 生产工艺
              that.leibieShow = false // 类别
              that.beixingShow = false // 杯型厚度
              that.tiebuShow = false // 贴布材质
              that.kuandufenleiShow = false // 宽度分类
              that.fukuanShow = false // 幅宽
              that.huagaoShow = false// 花高
              that.kezhongShow = false// 克重
              that.tanliShow = false // 弹力
              that.guangzeShow = false // 光泽
              that.kuanduShow = false // 宽度
              that.yuanliaoShow = false // 原料纱支
              that.chengbenShow = false // 成分比例
              that.pantongShow = false // 潘通色号
              that.huaxingShow = false // 花型尺寸
              that.pantongShow = false // 潘通色号
              that.bianzhiShow = false // 编织工艺
              that.xinghaoShow = false // 规格型号
              that.chicunShow = false // 拉链尺寸
              that.hanjiaoShow = false // 含胶量
              that.houduShow = false // 厚度
              that.latouShow = false // 拉头工艺
              const fuliaoFenLei = '/app/dict/other_type'
              queryShangPinFenLei(fuliaoFenLei, {}).then(response => {
                that.shangPinFenLeiList = response.data.data
              })
            }
          }
        })
      },
      clearParam() {
        const that = this
        that.goodDetail = {}
        // that.form.btype = ''
        // that.form.zileimuType = ''
        // that.form.goodsCType = ''
        // that.form.goodsDType = ''
        // that.form.goodsDTypeweight = ''
        // that.form.componentProportion = ''
        // that.form.flowerSize = ''
        // that.form.width = ''
        // that.form.size = ''
        // that.form.patchMaterial = ''
        // that.form.pantoneNum = ''
        // that.form.breadth = ''
        // that.form.rubberContent = ''
        // that.form.thickness = ''
        // that.form.otherParam = ''
        // that.form.flowerHigh = ''
        // that.form.sliderProcess = ''
        // that.form.specificationModel = ''
        // that.form.productionProcess = ''
        // that.form.glossiness = ''
        // that.form.cupThickness = ''
        // that.form.zipperType = ''
        // that.form.material = ''
        // that.form.widthClass = ''
        // that.form.rawYarn = ''
        // that.form.elasticDegree = ''
        // that.form.wrapperMaterial = ''
      },
      // 布料改变
      changeBuLiaoLeiMu(val) {
        const that = this
        that.clearParam()
        const url = '/app/yykGoodsType/goodsTypeTree' + '/' + val
        queryShangPinLeiMu(url, {}).then(response => {
          that.childrenTypeList = response.data.data
          that.goodDetail.btype = val
        })
        // 素色布
        if (val === 9) {
          that.goodsCType = ''
          that.color = ''
          that.bianzhiShow = true // 编织工艺
          that.pantongShow = true // 潘通色号
          that.kezhongShow = true // 克重
          that.yuanliaoShow = true // 原料纱支
          that.chengbenShow = true // 成分比例
          that.guangzeShow = true // 光泽
          that.fukuanShow = true // 幅宽
          that.baozhuangShow = false // 包装材质
          that.guigecicunShow = false // 规格尺寸
          that.tiebuShow = false // 贴布材质
          that.beixingShow = false // 杯型厚度
          that.xinghaoShow = false // 规格型号
          that.chicunShow = false // 拉链尺寸
          that.kuandufenleiShow = false // 宽度分类
          that.huagaoShow = false // 花高
          that.tanliShow = false // 弹力
          that.caizhiShow = false // 材质
          that.qitaShow = false // 其他参数
          that.hanjiaoShow = false // 含胶量
          that.houduShow = false // 厚度
          that.kuanduShow = false // 宽度
          that.huaxingShow = false // 花型尺寸
          that.shengchanShow = false // 生产工艺
          that.latouShow = false // 拉头工艺
          that.leibieShow = false // 类别
          that.gongChangDiZhiShow = false // 工厂地址展示
          const suseUrl = '/app/dict/shads_cloth'
          queryShangPinFenLei(suseUrl, {}).then(response => {
            that.shangPinFenLeiList = response.data.data
          })
        }
        // 印花
        if (val === 10) {
          that.bianzhiShow = true // 编织工艺
          that.leibieShow = true // 类别
          that.huaxingShow = true // 花型尺寸
          that.guangzeShow = true // 光泽
          that.kezhongShow = true // 克重
          that.yuanliaoShow = true // 原料纱支
          that.chengbenShow = true // 成分比例
          that.fukuanShow = true // 幅宽
          that.pantongShow = false // 潘通色号
          that.baozhuangShow = false // 包装材质
          that.guigecicunShow = false // 规格尺寸
          that.tiebuShow = false // 贴布材质
          that.beixingShow = false // 杯型厚度
          that.xinghaoShow = false // 规格型号
          that.chicunShow = false // 杯型厚度
          that.kuandufenleiShow = false // 宽度分类
          that.huagaoShow = false // 花高
          that.tanliShow = false // 弹力
          that.caizhiShow = false // 材质
          that.qitaShow = false // 其他参数
          that.hanjiaoShow = false // 含胶量
          that.houduShow = false // 厚度
          that.kuanduShow = false // 宽度
          that.shengchanShow = false // 生产工艺
          that.latouShow = false // 拉头工艺
          that.gongChangDiZhiShow = false // 工厂地址展示
          const yinhuaUrl = '/app/dict/print_face_cloth'
          queryShangPinFenLei(yinhuaUrl, {}).then(response => {
            that.shangPinFenLeiList = response.data.data
          })
          const libuLeiBieUrl = '/app/dict/printing_cloth_type'
          queryShangPinFenLei(libuLeiBieUrl, {}).then(response => {
            that.shangpinLieBieList = response.data.data
          })
        }
        // 提花
        if (val === 11) {
          that.bianzhiShow = true // 编织工艺
          that.guangzeShow = true // 光泽
          that.kezhongShow = true // 克重
          that.yuanliaoShow = true // 原料纱支
          that.chengbenShow = true // 成分比例
          that.fukuanShow = true // 幅宽
          that.pantongShow = true // 潘通色号
          that.huaxingShow = false // 花型尺寸
          that.pantongShow = false // 潘通色号
          that.baozhuangShow = false // 包装材质
          that.guigecicunShow = false // 规格尺寸
          that.leibieShow = false // 类别
          that.tiebuShow = false // 贴布材质
          that.beixingShow = false // 杯型厚度
          that.xinghaoShow = false // 规格型号
          that.chicunShow = false // 杯型厚度
          that.kuandufenleiShow = false // 宽度分类
          that.huagaoShow = false // 花高
          that.tanliShow = false // 弹力
          that.caizhiShow = false // 材质
          that.qitaShow = false // 其他参数
          that.hanjiaoShow = false // 含胶量
          that.houduShow = false // 厚度
          that.kuanduShow = false // 宽度
          that.shengchanShow = false // 生产工艺
          that.latouShow = false // 拉头工艺
          that.gongChangDiZhiShow = false // 工厂地址展示
          const tihuaUrl = '/app/dict/jacquard_face_cloth'
          queryShangPinFenLei(tihuaUrl, {}).then(response => {
            that.shangPinFenLeiList = response.data.data
          })
        }
        // 里布
        if (val === 2) {
          that.bianzhiShow = true // 编织工艺
          that.leibieShow = true // 类别
          that.guangzeShow = true // 光泽
          that.kezhongShow = true // 克重
          that.yuanliaoShow = true // 原料纱支
          that.chengbenShow = true // 成分比例
          that.fukuanShow = true // 幅宽
          that.pantongShow = true // 潘通色号
          that.huaxingShow = false // 花型尺寸
          that.pantongShow = false // 潘通色号
          that.baozhuangShow = false // 包装材质
          that.guigecicunShow = false // 规格尺寸
          that.tiebuShow = false // 贴布材质
          that.beixingShow = false // 杯型厚度
          that.xinghaoShow = false // 规格型号
          that.chicunShow = false // 拉链尺寸
          that.kuandufenleiShow = false // 宽度分类
          that.huagaoShow = false // 花高
          that.tanliShow = false // 弹力
          that.caizhiShow = false // 材质
          that.qitaShow = false // 其他参数
          that.hanjiaoShow = false // 含胶量
          that.houduShow = false // 厚度
          that.kuanduShow = false // 宽度
          that.shengchanShow = false // 生产工艺
          that.latouShow = false // 拉头工艺
          const libuUrl = '/app/dict/inside_cloth'
          queryShangPinFenLei(libuUrl, {}).then(response => {
            that.shangPinFenLeiList = response.data.data
          })
          const libuLeiBieUrl = '/app/dict/inside_cloth_type'
          queryShangPinFenLei(libuLeiBieUrl, {}).then(response => {
            that.shangpinLieBieList = response.data.data
          })
        }
      },
      // 商品子类目
      changeShangPinZiLeiMu(val) {
        const that = this
        that.clearParam()
        if (that.goodDetail.atype === 1) {
          that.zileimuType = val
          that.goodDetail.ctype = that.zileimuType
        } else {
          that.clearParam()
          that.zileimuType = val
          that.goodDetail.ctype = ''
          that.goodDetail.btype = that.zileimuType
          // 工厂地址显隐
          if (that.goodDetail.atype === 7 && that.goodDetail.btype !== 24) {
            that.gongChangDiZhiShow = true
          } else {
            that.gongChangDiZhiShow = false
          }
          // 松紧带
          if (that.goodDetail.atype === 3 && val === 16) {
            that.leibieShow = true // 类别
            that.caizhiShow = true // 材质
            that.kuanduShow = true // 宽度
            that.tanliShow = true // 弹力
            that.qitaShow = true // 其他参数
            that.guangzeShow = false // 光泽
            that.kezhongShow = false // 克重
            that.yuanliaoShow = false // 原料纱支
            that.chengbenShow = false // 成分比例
            that.fukuanShow = false // 幅宽
            that.pantongShow = false // 潘通色号
            that.huaxingShow = false // 花型尺寸
            that.pantongShow = false // 潘通色号
            that.bianzhiShow = false // 编织工艺
            that.baozhuangShow = false // 包装材质
            that.guigecicunShow = false // 规格尺寸
            that.tiebuShow = false // 贴布材质
            that.beixingShow = false // 杯型厚度
            that.xinghaoShow = false // 规格型号
            that.chicunShow = false // 拉链尺寸
            that.kuandufenleiShow = false // 宽度分类
            that.huagaoShow = false // 花高
            that.hanjiaoShow = false // 含胶量
            that.houduShow = false // 厚度
            that.shengchanShow = false // 生产工艺
            that.latouShow = false // 拉头工艺
            const libuLeiBieUrl = '/app/dict/elastic_type'
            queryShangPinFenLei(libuLeiBieUrl, {}).then(response => {
              that.shangpinLieBieList = response.data.data
            })
          }
          // 花边
          if (that.goodDetail.atype === 3 && val === 17) {
            that.leibieShow = true // 类别
            that.kuandufenleiShow = true // 宽度分类
            that.fukuanShow = true // 幅宽
            that.huagaoShow = true// 花高
            that.caizhiShow = true // 材质
            that.kezhongShow = true// 克重
            that.tanliShow = true // 弹力
            that.qitaShow = false // 其他参数
            that.guangzeShow = false // 光泽
            that.kuanduShow = false // 宽度
            that.yuanliaoShow = false // 原料纱支
            that.chengbenShow = false // 成分比例
            that.pantongShow = false // 潘通色号
            that.huaxingShow = false // 花型尺寸
            that.pantongShow = false // 潘通色号
            that.bianzhiShow = false // 编织工艺
            that.baozhuangShow = false // 包装材质
            that.guigecicunShow = false // 规格尺寸
            that.tiebuShow = false // 贴布材质
            that.beixingShow = false // 杯型厚度
            that.xinghaoShow = false // 规格型号
            that.chicunShow = false // 拉链尺寸
            that.hanjiaoShow = false // 含胶量
            that.houduShow = false // 厚度
            that.shengchanShow = false // 生产工艺
            that.latouShow = false // 拉头工艺
            const libuLeiBieUrl = '/app/dict/lace_type'
            queryShangPinFenLei(libuLeiBieUrl, {}).then(response => {
              that.shangpinLieBieList = response.data.data
            })
          }
          // 织带
          if (that.goodDetail.atype === 3 && val === 18) {
            that.leibieShow = true // 类别
            that.kuanduShow = true // 宽度
            that.caizhiShow = true // 材质
            that.tanliShow = true // 弹力
            that.qitaShow = true // 其他参数
            that.kezhongShow = false// 克重
            that.guangzeShow = false // 光泽
            that.fukuanShow = false // 幅宽
            that.huagaoShow = false// 花高
            that.kuandufenleiShow = false // 宽度分类
            that.yuanliaoShow = false // 原料纱支
            that.chengbenShow = false // 成分比例
            that.pantongShow = false // 潘通色号
            that.huaxingShow = false // 花型尺寸
            that.pantongShow = false // 潘通色号
            that.bianzhiShow = false // 编织工艺
            that.baozhuangShow = false // 包装材质
            that.guigecicunShow = false // 规格尺寸
            that.tiebuShow = false // 贴布材质
            that.beixingShow = false // 杯型厚度
            that.xinghaoShow = false // 规格型号
            that.chicunShow = false // 拉链尺寸
            that.hanjiaoShow = false // 含胶量
            that.houduShow = false // 厚度
            that.shengchanShow = false // 生产工艺
            that.latouShow = false // 拉头工艺
            const libuLeiBieUrl = '/app/dict/ribbon_type'
            queryShangPinFenLei(libuLeiBieUrl, {}).then(response => {
              that.shangpinLieBieList = response.data.data
            })
          }
          // 拉链
          if (that.goodDetail.atype === 3 && val === 20) {
            that.leibieShow = true // 类别
            that.chicunShow = true // 拉链尺寸
            that.caizhiShow = true // 材质
            that.latouShow = true // 拉头工艺
            that.qitaShow = true // 其他参数
            that.tanliShow = false // 弹力
            that.kezhongShow = false// 克重
            that.guangzeShow = false // 光泽
            that.fukuanShow = false // 幅宽
            that.kuanduShow = false // 宽度
            that.huagaoShow = false// 花高
            that.kuandufenleiShow = false // 宽度分类
            that.yuanliaoShow = false // 原料纱支
            that.chengbenShow = false // 成分比例
            that.pantongShow = false // 潘通色号
            that.huaxingShow = false // 花型尺寸
            that.pantongShow = false // 潘通色号
            that.bianzhiShow = false // 编织工艺
            that.baozhuangShow = false // 包装材质
            that.guigecicunShow = false // 规格尺寸
            that.tiebuShow = false // 贴布材质
            that.beixingShow = false // 杯型厚度
            that.xinghaoShow = false // 规格型号
            that.hanjiaoShow = false // 含胶量
            that.houduShow = false // 厚度
            that.shengchanShow = false // 生产工艺
            const libuLeiBieUrl = '/app/dict/zipper_type'
            queryShangPinFenLei(libuLeiBieUrl, {}).then(response => {
              that.shangpinLieBieList = response.data.data
            })
          }
          // 其他
          if (that.goodDetail.atype === 3 && val === 21) {
            that.xinghaoShow = true // 规格型号
            that.caizhiShow = true // 材质
            that.qitaShow = true // 其他参数
            that.tanliShow = true // 弹力
            that.latouShow = false // 拉头工艺
            that.chicunShow = false // 拉链尺寸
            that.leibieShow = false // 类别
            that.kezhongShow = false// 克重
            that.guangzeShow = false // 光泽
            that.fukuanShow = false // 幅宽
            that.kuanduShow = false // 宽度
            that.huagaoShow = false// 花高
            that.kuandufenleiShow = false // 宽度分类
            that.yuanliaoShow = false // 原料纱支
            that.chengbenShow = false // 成分比例
            that.pantongShow = false // 潘通色号
            that.huaxingShow = false // 花型尺寸
            that.pantongShow = false // 潘通色号
            that.bianzhiShow = false // 编织工艺
            that.baozhuangShow = false // 包装材质
            that.guigecicunShow = false // 规格尺寸
            that.tiebuShow = false // 贴布材质
            that.beixingShow = false // 杯型厚度
            that.hanjiaoShow = false // 含胶量
            that.houduShow = false // 厚度
            that.shengchanShow = false // 生产工艺
            const libuLeiBieUrl = '/app/dict/lace_type'
            queryShangPinFenLei(libuLeiBieUrl, {}).then(response => {
              that.shangpinLieBieList = response.data.data
            })
          }
          // 橡皮
          if (that.goodDetail.atype === 3 && val === 47) {
            that.hanjiaoShow = true // 含胶量
            that.kuanduShow = true // 宽度
            that.houduShow = true // 厚度
            that.qitaShow = true // 其他参数
            that.tanliShow = false // 弹力
            that.caizhiShow = false // 材质
            that.latouShow = false // 拉头工艺
            that.xinghaoShow = false // 规格型号
            that.chicunShow = false // 拉链尺寸
            that.leibieShow = false // 类别
            that.kezhongShow = false// 克重
            that.guangzeShow = false // 光泽
            that.fukuanShow = false // 幅宽
            that.huagaoShow = false// 花高
            that.kuandufenleiShow = false // 宽度分类
            that.yuanliaoShow = false // 原料纱支
            that.chengbenShow = false // 成分比例
            that.pantongShow = false // 潘通色号
            that.huaxingShow = false // 花型尺寸
            that.pantongShow = false // 潘通色号
            that.bianzhiShow = false // 编织工艺
            that.baozhuangShow = false // 包装材质
            that.guigecicunShow = false // 规格尺寸
            that.tiebuShow = false // 贴布材质
            that.beixingShow = false // 杯型厚度
            that.shengchanShow = false // 生产工艺
          }
          // 胸杯 胸杯
          if (that.goodDetail.atype === 4 && val === 45) {
            const libuLeiBieUrl = '/app/dict/thoracic_cup_type'
            queryShangPinFenLei(libuLeiBieUrl, {}).then(response => {
              that.shangpinLieBieList = response.data.data
            })
          }
          // 胸杯 - 钢圈
          if (that.goodDetail.atype === 4 && val === 49) {
            const gangquanUrl = '/app/dict/steel_rim'
            queryShangPinFenLei(gangquanUrl, {}).then(response => {
              that.shangpinLieBieList = response.data.data
            })
          }
          // 胸杯 - 杯垫
          if (that.goodDetail.atype === 4 && val === 50) {
            const gangquanUrl = '/app/dict/thoracic_cup_coaster'
            queryShangPinFenLei(gangquanUrl, {}).then(response => {
              that.shangpinLieBieList = response.data.data
            })
          }
          // 包装材料-衣架
          if (that.goodDetail.atype === 7 && val === 24) {
            const gangquanUrl = '/app/dict/wrapper_hanger'
            queryShangPinFenLei(gangquanUrl, {}).then(response => {
              that.shangPinFenLeiList = response.data.data
            })
          }
          // 包装材料-商标
          if (that.goodDetail.atype === 7 && val === 25) {
            const gangquanUrl = '/app/dict/wrapper_trademark'
            queryShangPinFenLei(gangquanUrl, {}).then(response => {
              that.shangPinFenLeiList = response.data.data
            })
          }
          // 包装材料-吊牌
          if (that.goodDetail.atype === 7 && val === 26) {
            const gangquanUrl = '/app/dict/wrapper_tag'
            queryShangPinFenLei(gangquanUrl, {}).then(response => {
              that.shangPinFenLeiList = response.data.data
            })
          }
          // 包装材料-塑料袋
          if (that.goodDetail.atype === 7 && val === 27) {
            const gangquanUrl = '/app/dict/wrapper_plastic_bag'
            queryShangPinFenLei(gangquanUrl, {}).then(response => {
              that.shangPinFenLeiList = response.data.data
            })
          }
          // 包装材料-裆贴
          if (that.goodDetail.atype === 7 && val === 28) {
            const gangquanUrl = '/app/dict/wrapper_paper'
            queryShangPinFenLei(gangquanUrl, {}).then(response => {
              that.shangPinFenLeiList = response.data.data
            })
          }
          // 包装材料-纸箱
          if (that.goodDetail.atype === 7 && val === 29) {
            const gangquanUrl = '/app/dict/wrapper_carton'
            queryShangPinFenLei(gangquanUrl, {}).then(response => {
              that.shangPinFenLeiList = response.data.data
            })
          }
        }
      }
    }
  }
</script>
<style>
  .avatar-uploader .el-upload {
    border: 1px dashed #d9d9d9;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
  }
  .avatar-uploader .el-upload:hover {
    border-color: #409EFF;
  }
</style>
<style scoped>
  .avatar-uploader-icon {
    font-size: 28px;
    color: #8c939d;
    width: 178px;
    height: 178px;
    line-height: 178px;
    text-align: center;
  }
  .avatars {
    display: block;
    width: 178px;
    height: 178px;
  }
  .title{
    font-weight: bold;
    font-size: 24px;
  }

  .el-input {
    position: relative;
    font-size: 14px;
    display: inline-block;
    width: 80% !important;
  }
  .el-form {
    margin-left: 36px;
  }
  .is-disabled{
    background-color: #fff;
  }
  .inputRow{
    background-color: #fff !important;
    display: block;
    width: 65%;
    height: 40px;
    line-height: 40px;
    padding-left: 20px;
    border: 1px solid #f5f5f5;
  }
  .el-input__inner{
    background-color: #fff !important;
  }
  .el-input__inner{
    background-color: #fff !important;
  }
  .textareaCon{
    width: 80%;
    border: 1px solid #f5f5f5;
    border-radius: 10px;
    margin-bottom: 20px;
    padding: 15px;
  }
  .el-select{
    width: 80% !important;
  }
  .imgContent{
    overflow: hidden;
    margin: 10px 0;
  }
  .goodImg {
    width: 30px;
    height: 30px;
  }
  .topPic{
    float: left;
    width: 146px;
    height: 146px;
    margin-right: 15px;
    margin-bottom: 15px;
  }
  .el-input{
    width: 80%;
  }
  .avatar{
    width: 250px;
  }
  .el-button--mini, .el-button--mini.is-round {
    padding: 7px 15px;
    margin-bottom: 10px
  }
  .specialText{
    display: block;
  }
  .detailContent{
    border: 1px solid #f5f5f5;
    padding: 20px;
  }
</style>
